<!--Copyright (C) Kherty.  All rights reserved.-->
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Internals="clr-namespace:OpenLS.Spreadsheet.UI.Internals"
    xmlns:Internals1="clr-namespace:OpenLS.UI.Internals;assembly=OpenLS.UI"
    x:Class="OpenLS.Spreadsheet.UI.DialogResources"
    >
  <Style TargetType="{x:Type Window}" x:Key="dialogWindow">
    <Setter Property="Background" Value="{x:Static SystemColors.ControlLightBrush}"/>
    <Setter Property="SizeToContent" Value="WidthAndHeight" />
    <Setter Property="ShowInTaskbar" Value="False"/>
    <EventSetter Event ="Button.Click" Handler="OnButtonClick"/>
  </Style>
    <Style TargetType="{x:Type Popup}" x:Key="popupDialogWindow">
        <EventSetter Event ="Button.Click" Handler="OnPopupButtonClick"/>

    </Style>
    <Style TargetType="{x:Type Border}" x:Key="popupBorderStyle">
        <Setter Property="Background" Value="{x:Static SystemColors.ControlLightBrush}"/>

    </Style>
  <Style TargetType="{x:Type RadioButton}">
    <Setter Property="Margin" Value="4"/>
  </Style>
    <Style TargetType="{x:Type Button}">
    <Setter Property="Margin" Value="5"/>
    <Setter Property="MinWidth" Value="74"/>
    <Setter Property="MinHeight" Value="24"/>
        <Style.Triggers>
            <Trigger Property="IsDefault" Value="True">
                <Setter Property="Content" Value="{x:Static Internals1:UIStringTable.OK}"></Setter>
            </Trigger>
            <Trigger Property="IsCancel" Value="True">
                <Setter Property="Content" Value="{x:Static Internals1:UIStringTable.Cancel}"></Setter>
            </Trigger>
        </Style.Triggers>
  </Style>
  <Style TargetType="{x:Type TextBlock}" x:Key="textBlockStyle">
    <Setter Property="Margin" Value="5"/>
  </Style>
    <Style TargetType="{x:Type TextBox}">
        <Setter Property="VerticalAlignment" Value="Center" />
        <Setter Property="Margin" Value="0,2,40,2" />
        <Setter Property="Validation.ErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <DockPanel LastChildFill="true">
                        <Border Background="Red" DockPanel.Dock="right" Margin="5,0,0,0" Width="20" Height="20" CornerRadius="10"
                                    ToolTip="{Binding ElementName=customAdorner, Path=AdornedElement.(Validation.Errors)[0].ErrorContent}">
                            <TextBlock Text="!" VerticalAlignment="center" HorizontalAlignment="center" FontWeight="Bold" Foreground="white">
                            </TextBlock>
                        </Border>
                        <AdornedElementPlaceholder Name="customAdorner" VerticalAlignment="Center" >
                            <Border BorderBrush="red" BorderThickness="1" />
                        </AdornedElementPlaceholder>
                    </DockPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>